home *** CD-ROM | disk | FTP | other *** search
- /* perfdisp.c - measures the performance of disp_page */
- #include "stdio.h"
-
- char filename[81] ;
- char s[2500] ;
- extern int row , col ;
- long filesize ;
- long top_of_page ;
- int ix ;
-
- main()
- {
- int j , ll ;
- char c ;
-
- /* initialize filename , top_of_page and filesize */
- strcpy(filename,"< file name >") ;
- top_of_page = 3000 ;
- filesize = 123456789 ;
-
- /* build list of chars to be displayed */
- printf("\n line length:") ;
- scanf("%d",&ll) ;
- for( j=0 ; j < ll ; j = j+1 )
- { s[j] = ' '+j ; }
- s[ll] = '\0' ;
-
- /* set up a standing start */
- printf("\n press enter to start") ;
- scanf("%c%c",&c,&c) ;
-
- /* display the page 10 times for accuracy */
- for(j=1 ; j <= 10 ; j = j+1 )
- { display_page() ; }
-
- printf("\n ** thru **") ;
- }
-
- int get_next_char()
- {
- if( s[ix] == '\0' )
- { ix = 0 ;
- return('\0') ;
- }
- else
- { ix = ix + 1 ;
- return( s[ix-1] ) ;
- }
- }
-
- int move_to(pos)
- long pos ;
- {
- ix = 0 ;
- }
-
-
-